﻿using Microsoft.Extensions.Logging;
using System;
using System.Runtime.Serialization;
using Loong.Logging;

namespace Loong
{
    [Serializable]
    public class LoongException : Exception, IHasLogLevel
    {
        public virtual LogLevel LogLevel { get; set; } = LogLevel.Debug;

        public LoongException()
        { }

        protected LoongException(SerializationInfo serializationInfo, StreamingContext context)
            : base(serializationInfo, context)
        { }

        public LoongException(string message)
            : base(message)
        { }

        public LoongException(string message, Exception innerException)
            : base(message, innerException)
        { }
    }
}
